package cn.edu.wfit.modules.learn.service.impl.competitionmanagement;

import java.util.List;
import cn.edu.wfit.common.core.utils.DateUtils;
import cn.edu.wfit.modules.learn.domain.WfitCompetitionIndividualrecord;
import cn.edu.wfit.modules.learn.mapper.competitionmanagement.WfitCompetitionIndividualrecordMapper;
import cn.edu.wfit.modules.learn.service.competitionmanagement.IWfitCompetitionIndividualrecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 个人赛记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-07-28
 */
@Service
public class WfitCompetitionIndividualrecordServiceImpl implements IWfitCompetitionIndividualrecordService
{
    @Autowired
    private WfitCompetitionIndividualrecordMapper wfitCompetitionIndividualrecordMapper;

    /**
     * 查询个人赛记录
     * 
     * @param id 个人赛记录主键
     * @return 个人赛记录
     */
    @Override
    public WfitCompetitionIndividualrecord selectWfitCompetitionIndividualrecordById(Long id)
    {
        return wfitCompetitionIndividualrecordMapper.selectWfitCompetitionIndividualrecordById(id);
    }

    /**
     * 查询个人赛记录列表
     * 
     * @param wfitCompetitionIndividualrecord 个人赛记录
     * @return 个人赛记录
     */
    @Override
    public List<WfitCompetitionIndividualrecord> selectWfitCompetitionIndividualrecordList(WfitCompetitionIndividualrecord wfitCompetitionIndividualrecord)
    {
        return wfitCompetitionIndividualrecordMapper.selectWfitCompetitionIndividualrecordList(wfitCompetitionIndividualrecord);
    }

    /**
     * 新增个人赛记录
     * 
     * @param wfitCompetitionIndividualrecord 个人赛记录
     * @return 结果
     */
    @Override
    public int insertWfitCompetitionIndividualrecord(WfitCompetitionIndividualrecord wfitCompetitionIndividualrecord)
    {
        wfitCompetitionIndividualrecord.setCreateTime(DateUtils.getNowDate());
        return wfitCompetitionIndividualrecordMapper.insertWfitCompetitionIndividualrecord(wfitCompetitionIndividualrecord);
    }

    /**
     * 修改个人赛记录
     * 
     * @param wfitCompetitionIndividualrecord 个人赛记录
     * @return 结果
     */
    @Override
    public int updateWfitCompetitionIndividualrecord(WfitCompetitionIndividualrecord wfitCompetitionIndividualrecord)
    {
        wfitCompetitionIndividualrecord.setUpdateTime(DateUtils.getNowDate());
        return wfitCompetitionIndividualrecordMapper.updateWfitCompetitionIndividualrecord(wfitCompetitionIndividualrecord);
    }

    /**
     * 批量删除个人赛记录
     * 
     * @param ids 需要删除的个人赛记录主键
     * @return 结果
     */
    @Override
    public int deleteWfitCompetitionIndividualrecordByIds(Long[] ids)
    {
        return wfitCompetitionIndividualrecordMapper.deleteWfitCompetitionIndividualrecordByIds(ids);
    }

    /**
     * 删除个人赛记录信息
     * 
     * @param id 个人赛记录主键
     * @return 结果
     */
    @Override
    public int deleteWfitCompetitionIndividualrecordById(Long id)
    {
        return wfitCompetitionIndividualrecordMapper.deleteWfitCompetitionIndividualrecordById(id);
    }
}
